<%@ include file="/WEB-INF/jsp/include.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Registration</title>
</head>

<body>
<spring:bind path="accountForm.*">
  <c:forEach var="error" items="${status.errorMessages}">
    <B><FONT color=RED>
      <BR><c:out value="${error}"/>
    </FONT></B>
  </c:forEach>
</spring:bind>
<form action="<c:url value="newAccount.html"/>" method="post">
<c:if test="${accountForm.newAccount}">
Username
<spring:bind path="accountForm.account.username">
 <input type="text" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>"/>
</spring:bind>
</c:if>
<c:if test="${!accountForm.newAccount}">
  <c:out value="${accountForm.account.username}"/>
</c:if>
<br>
Password
<spring:bind path="accountForm.account.password">
 <input type="password" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>"/>
</spring:bind>
<br>
Retype Password
<spring:bind path="accountForm.repeatedPassword">
 <input type="password" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>"/>
</spring:bind>
<br>
First Name
<spring:bind path="accountForm.account.firstName">
 <input type="text" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>"/>
</spring:bind>
<br>
Last Name
<spring:bind path="accountForm.account.lastName">
 <input type="text" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>"/>
</spring:bind>
<br>
Status
<spring:bind path="accountForm.account.status">
 <input type="text" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>"/>
</spring:bind>
<br>
Mobile
<spring:bind path="accountForm.account.mobile">
 <input type="text" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>"/>
</spring:bind>
<br>
Email
<spring:bind path="accountForm.account.email">
 <input type="text" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>"/>
</spring:bind>
<br>
User Dir
<spring:bind path="accountForm.account.userdir">
 <input type="text" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>"/>
</spring:bind>
<br>
Favorites
<spring:bind path="accountForm.account.favorites">
 <input type="text" name="<c:out value="${status.expression}"/>" value="<c:out value="${status.value}"/>"/>
</spring:bind>

<input border="0" type="submit" name="submit" value="Save Account Information" />

</form>
</body>
</html>